Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Solved
    • Unsolved
    1. Home
    2. Tags
    3. sorting glyphs
    Log in to post

    • RafaŁ Buchner

      SOLVED Is there any way to track what character set was used in sorting?
      General Questions • scripting sorting glyphs • • RafaŁ Buchner  

      3
      0
      Votes
      3
      Posts
      224
      Views

      RafaŁ Buchner

      thanks! :)
    • StephenNixon

      SOLVED Preserve empty glyphs when applying defcon sort order through script
      General Questions • fontparts template glyphs glyph order sorting glyphs • • StephenNixon  

      3
      0
      Votes
      3
      Posts
      289
      Views

      StephenNixon

      @gferreira said in Preserve empty glyphs when applying defcon sort order through script: newGlyphOrder = f.naked().unicodeData.sortGlyphNames(f.templateGlyphOrder, sortDescriptors=[dict(type="cannedDesign", ascending=True, allowPseudoUnicode=True)]) f.templateGlyphOrder = newGlyphOrder Oh, interesting! Sure enough, changing glyphOrder to templateGlyphOrder fixed my script. It now works just as hoped. :) Thanks so much for point out that difference to me!
    • StephenNixon

      SOLVED Can I apply a "smart sort" for Glyph Order via script?
      General Questions • character set glyph order sorting glyphs • • StephenNixon  

      3
      1
      Votes
      3
      Posts
      958
      Views

      StephenNixon

      Thanks, @gferreira! That was a super helpful suggestion, including the link to the defcon docs. I find that for me, the cannedDesign sort type is seemingly identical to the "Smart Sort" option in Robofont, aside from deleting template glyphs. Still, those are easy enough to re-add manually, and something I don't need to do every time (Add Glyphs -> Import from my "Latin 1" character set... -> then select to "add as template glyphs"). So, the script I'll use is very close to your suggestion, but I prefer this sort type: font = CurrentFont() newGlyphOrder = font.naked().unicodeData.sortGlyphNames(font.glyphOrder, sortDescriptors=[dict(type="cannedDesign", ascending=True, allowPseudoUnicode=True)]) font.glyphOrder = newGlyphOrder